<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="channel/save" data-auto="true" method="post">
	
<div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value='${vo.name!""}' required="required" title="请输入名称"  placeholder="请输入名称" class="layui-input">
        </div>
    </div>
    <#if vo.channel??>
    <div class="layui-form-item">
        <label class="layui-form-label">渠道号</label>
        <div class="layui-input-block">
            <input type="text" name="channel" value='${vo.channel?c}' required="required"   readonly   class="layui-input">
        </div>
    </div>
	</#if>
    <div class="layui-form-item">
        <label class="layui-form-label">应用</label>
        <div class="layui-input-inline">
        	<input type='hidden' id="app_id" value='${vo.appId!""}' name='app_id'/>
            <input type="text" id="app_name" name="app_name" value='${vo.appName!""}' lay-verify="required" required="required" readonly title="请选择应用" placeholder="请选应用" class="layui-input">
        </div>
        <div class="layui-input-inline">
        	<button data-iframe='channel/select_app' type='button' data-title="选择应用" class='layui-btn layui-btn-small'>选择</button>
        </div> 
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">运营商</label>
        <div class="layui-input-inline">
        <input type='hidden' id="mch_id" value='${vo.opreatorId!""}' name='mch_id'/>
        <input type="text" id="mch_name" name="mch_name" value='${vo.operator!""}' lay-verify="required" required="required" readonly title="请选择运营商" placeholder="请选择运营商" class="layui-input">
        </div>
        <div class="layui-input-inline">
        <button data-iframe='channel/select_mch' type='button' data-title="选择商家" class='layui-btn layui-btn-small'>选择</button>
        </div>
    </div>
    
    <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">描述</label>
	    <div class="layui-input-block">
	      <textarea name="desc" placeholder="请输入内容" class="layui-textarea">${vo.desc!""}</textarea>
	    </div>
	 </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
       
        <input type='hidden' value='${vo.id}' name='id'/>
  
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>
</form>
<#noparse>
<script>
function selectedApp(id,name){
	$('#app_id').val(id);
	$('#app_name').val(name);
	layer.close(layer.index);
};
function selectedMch(id,name){
	$('#mch_id').val(id);
	$('#mch_name').val(name);
	layer.close(layer.index);
};
</script>
</#noparse>